package com.xl.object;

public class Student {
    String name;
    double chineseScore;
    double mathScore;

    public void totalScore() {
        double total = chineseScore + mathScore;
        System.out.println(name+"的总成绩是: " + total);
    }

    public void averageScore() {
        double average = (chineseScore + mathScore) / 2;
        System.out.println(name+"的平均成绩是: " + average);
    }
}
